using System.Collections.Generic;
using System.Linq;

using NL.Combat;

using UnityEngine;

namespace NL.Advanced
{
    public class PropertyCC : Property
    {
        public virtual bool IsCrit()
        {
            return false;
        }

        public virtual float CritFator()
        {
            return 1;
        }

        public virtual float GetEDByStage(int stage)
        {
            return 0;
        }

        public virtual PropertyCC Clone(GameObject Target)
        {
            var _np = Target.AddComponent<PropertyCC>();

            _np.Base = new Annexs(Base.ToString());
            _np.Addi = new Annexs(Addi.ToString());

            if(Group != null && Group.Count > 0)
            {
                foreach(var group in Group)
                {
                    _np.Add(group.Value.ToString());
                }
            }
        
            return _np;
        }

        public Annexs[] GetGroup()
        {
            return Group.Values.ToArray();
        }
    }
}

